package inner_class;

import java.util.Comparator;
import java.util.PriorityQueue;
import java.util.Queue;

/**
 * @author HanDianzhi
 * @version 1.0
 * @description: 创建线程的五种写法
 * @date 2022/7/20 17:02
 */
public class NoNameClass {
    public static void main(String[] args) {
        Queue<Integer> queue = new PriorityQueue<>(new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return 0;
            }
        });
        fun(new IMessage() {
            @Override
            public void getMsg(String msg) {

            }
        });
    }

    public static void fun(IMessage message) {
        message.getMsg("测试匿名内部类");
    }
}

interface IMessage {
    void getMsg(String msg);
}